from django.shortcuts import render
from .models import VideosReviewing
from .serializer import VideosReviewingSerializer
from rest_framework import viewsets, mixins
from .models import UserProfile


# Create your views here.
class VideosReviewingViewSet(viewsets.ModelViewSet):
    serializer_class = VideosReviewingSerializer

    def get_queryset(self):
        queryset = VideosReviewing.objects.all()
        params = self.request.query_params
        if params:
            filters = {}
            for key, value in params.items():
                filters[key] = value
            queryset = queryset.filter(**filters)
        return queryset
    


    
